let success = {}

// 新增成功返回到简历
success.add = function() {
  wx.showToast({
    title: '保存成功',
    success(res) {
      wx.reLaunch({
        url: '/pages/home/job/resume/index',
      })
    }
  })
}

// 修改成功返回到简历
success.update = function() {
  wx.showToast({
    title: '修改成功',
    success(res) {
      wx.reLaunch({
        url: '/pages/home/job/resume/index',
      })
    }
  })
}

// 搜索成功返回到简历
success.search = function() {
  let self = this;
  return new Promise((resolve, reject) => {
    wx.showToast({
      title: '搜索成功',
      icon: 'none',
      success(res) {
        let searchTrue =  true
          resolve(searchTrue)
      }
    })
   
  })
}

// 删除
success.del = function(txt) {
  let self = this;
  return new Promise((resolve, reject) => {
    wx.showModal({
      title: txt,
      confirmText: '删除',
      showCancel: true,
      success(res) {
        if (res.confirm) {
          let conTrue =  res.confirm;
          resolve(conTrue)
        }
      }
    })
  })
}

module.exports = success;